<template>
	<view>
		
	</view>
</template>

<script>
	import { USER_INFO } from '@/config.js'
	export default {
		data() {
			return {
				
			}
		},
		created() {
			
		},
		methods: {
			initMessage() {
				// 先获取账户登录状态
				(() => {
					let localDevice = true
					let token = 'xxx'
					console.log(this.lang)
					let { tokenInvalidTips, deviceInvalidTips, confirm: confirmText } = this.lang_once
					// 判断是不是本设备
					if (localDevice) {
						// 判断本地存储的时间节点，超过7天就重新登录
						if (token) {
							uni.showModal({
								title: '',
								content: tokenInvalidTips,
								showCancel: false,
								confirmText: confirmText,
								success: ({ confirm }) => {
									if (confirm) {
										uni.reLaunch({ url: '/pages/first/login/login' })
									}
								}
							})
						} else {
							// 
						}
					} else {
						// 你的账户已在其他手机设备上登录，请重新登录
						uni.showModal({
							title: '',
							content: deviceInvalidTips,
							showCancel: false,
							confirmText: confirmText,
							success: ({ confirm }) => {
								if (confirm) {
									uni.reLaunch({ url: '/pages/first/login/login' })
								}
							}
						})
					}
				})()
			}
		}
	}
</script>

<style>
</style>
